<jsp:include page="header.jsp" />
<jsp:include page="sidenav.jsp" />

<%@ page import="java.util.List" %>
<%@ page import="databean.ProductBean" %>

<div id ="content">
    <h1>HOT! on eBay</h1>
	<hr />	
	<p class="right italic"><font color=#FF0000>Don't forget to refresh this page! It changes all the time!</font></p>
	<br>
<% 
	List<ProductBean> products = (List<ProductBean>) request.getAttribute("products");
	boolean left = true;	
	for(ProductBean product:products){
%>


	
<%
		if (left) {
%>



<div class ="hotproduct left half">

<img src="<%=product.getImageURL()%>">
<div class="space"><a href="<%=product.getProductURL()%>" target="_blank"><%=product.getTitle()%></a></div>
<div class="des">
<p><label for="catalogName">Catalog Name:</label><span class="right"><%=product.getCatalogName()%></span></p>
<p><label for="reviewCount">Review Count:</label><span class="right"><%=product.getReviewCount()%></span></p>
<p><label for="priceRangeMin">PriceRange Min:</label><span class="right"><%=product.getPriceRangeMin()%></span></p>
<p><label for="priceRangeMax">PriceRange Max:</label><span class="right"><%=product.getPriceRangeMax()%></span></p>
</div>
</div>


<%
	left = false;
		} else {
%>


<div class = "hotproduct right half">

<img src="<%=product.getImageURL()%>">
<div class="space"><a href="<%=product.getProductURL()%>" target="_blank"><%=product.getTitle()%></a></div>
<div class="des">
<p><label for="catalogName">Catalog Name:</label><span class="right"><%=product.getCatalogName()%></span></p>
<p><label for="reviewCount">Review Count:</label><span class="right"><%=product.getReviewCount()%></span></p>
<p><label for="priceRangeMin">PriceRange Min:</label><span class="right"><%=product.getPriceRangeMin()%></span></p>
<p><label for="priceRangeMax">PriceRange Max:</label><span class="right"><%=product.getPriceRangeMax()%></span></p>
</div>
</div>


<%
	left = true;
		}
%>

<%
}
%>

</div>
<jsp:include page="footer.jsp" />